<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/static/js/jquery.js"></script>
    <script>
        $(function () {
            $("#c1").click(function () {
                var a = $("#a1").val();
                var b = $("#b1").val();
                var t = $("#t1").val();
                if(a==""){
                    alert("账号不能为空");
                    return false;
                }
                if(b==""){
                    alert("密码不能为空");
                    return false;
                }
                if(t==""){
                    alert("电话不能为空");
                    return false;
                }
                return true;
            })
        })
    </script>
</head>
<body>
<form action="" method="post">
    <table align="center">
        <tr>
            <td>用户名 </td>
            <td><input type="text" name="uname" id="a1"></td>
        </tr>
        <tr>
            <td>密码 </td>
            <td><input type="text" name="pwd" id="b1"></td>
        </tr>
        <tr>
            <td>
                性别
            </td>
            <td>
                <input type="radio" name="sex" value="boy">男
                <input type="radio" name="sex" value="girl">女
            </td>
        </tr>
        <tr>
            <td>电话 </td>
            <td><input type="text" name="tel" id="t1"></td>
        </tr>
        <tr>
            <td colspan="4">
                <button id="c1">注册</button>
                <a href="{% url 'login' %}" style="text-decoration: aliceblue">已有账号，直接登录</a>
            </td>
        </tr>
    </table>
</form>
</body>
</html>